package com.dd.machine.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.dd.machine.main.user.model.AppAdver;
import com.dd.machine.main.user.model.AppGoodsKind;
import com.dd.machine.main.user.model.Equeipment;
import com.dd.machine.main.user.model.OrderForm;

import com.dd.machine.greendao.gen.AppAdverDao;
import com.dd.machine.greendao.gen.AppGoodsKindDao;
import com.dd.machine.greendao.gen.EqueipmentDao;
import com.dd.machine.greendao.gen.OrderFormDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig appAdverDaoConfig;
    private final DaoConfig appGoodsKindDaoConfig;
    private final DaoConfig equeipmentDaoConfig;
    private final DaoConfig orderFormDaoConfig;

    private final AppAdverDao appAdverDao;
    private final AppGoodsKindDao appGoodsKindDao;
    private final EqueipmentDao equeipmentDao;
    private final OrderFormDao orderFormDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        appAdverDaoConfig = daoConfigMap.get(AppAdverDao.class).clone();
        appAdverDaoConfig.initIdentityScope(type);

        appGoodsKindDaoConfig = daoConfigMap.get(AppGoodsKindDao.class).clone();
        appGoodsKindDaoConfig.initIdentityScope(type);

        equeipmentDaoConfig = daoConfigMap.get(EqueipmentDao.class).clone();
        equeipmentDaoConfig.initIdentityScope(type);

        orderFormDaoConfig = daoConfigMap.get(OrderFormDao.class).clone();
        orderFormDaoConfig.initIdentityScope(type);

        appAdverDao = new AppAdverDao(appAdverDaoConfig, this);
        appGoodsKindDao = new AppGoodsKindDao(appGoodsKindDaoConfig, this);
        equeipmentDao = new EqueipmentDao(equeipmentDaoConfig, this);
        orderFormDao = new OrderFormDao(orderFormDaoConfig, this);

        registerDao(AppAdver.class, appAdverDao);
        registerDao(AppGoodsKind.class, appGoodsKindDao);
        registerDao(Equeipment.class, equeipmentDao);
        registerDao(OrderForm.class, orderFormDao);
    }
    
    public void clear() {
        appAdverDaoConfig.clearIdentityScope();
        appGoodsKindDaoConfig.clearIdentityScope();
        equeipmentDaoConfig.clearIdentityScope();
        orderFormDaoConfig.clearIdentityScope();
    }

    public AppAdverDao getAppAdverDao() {
        return appAdverDao;
    }

    public AppGoodsKindDao getAppGoodsKindDao() {
        return appGoodsKindDao;
    }

    public EqueipmentDao getEqueipmentDao() {
        return equeipmentDao;
    }

    public OrderFormDao getOrderFormDao() {
        return orderFormDao;
    }

}
